package com.chapter.Demo02;
//外部类
public class Outer {
    //实例变量
    private String name = "张三";
    private int age=20;
    //内部类
    class Inner{
        private String address ="北京";
        //内部类属性与外部类属性名字相同；Outer.this
        private String name = "110";
        //方法
        public void show(){
            //打印外部类的属性,,内部类属性与外部类属性名字相同；Outer.this
            System.out.println(Outer.this.name);
            System.out.println(Outer.this.age);
            //打印内部类中的属性
            System.out.println(this.address);
            System.out.println(this.name);

        }
    }
}
